package com.example.shoppingmall.service;

import com.example.shoppingmall.pojo.ParameterJurisdiction;
import com.example.shoppingmall.dao.ParameterJurisdictionMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ParameterJurisdictionService {
    @Autowired
    private ParameterJurisdictionMapper parameterJurisdictionMapper;
    public List<ParameterJurisdiction> parameterJurisdictionList(@Param("parameterId")int parameterId){
        return parameterJurisdictionMapper.parameterJurisdictionList(parameterId);
    }
    public int add(ParameterJurisdiction parameterJurisdiction){
        return parameterJurisdictionMapper.add(parameterJurisdiction);
    }

    public int chackName(@Param("name")String name,@Param("parameterId")int parameterId){
        return parameterJurisdictionMapper.chackName(name,parameterId);
    }

    public int delete(@Param("id")int id){
        return parameterJurisdictionMapper.delete(id);
    }
}
